Skip to content

nix: add flake + packaging#18

Open
Mag1cByt3s wants to merge 2 commits intosynacktiv:masterfrom
Mag1cByt3s:nix-support
Open

nix: add flake + packaging#18
Mag1cByt3s wants to merge 2 commits intosynacktiv:masterfrom
Mag1cByt3s:nix-support

Conversation

@Mag1cByt3s
Copy link

@Mag1cByt3s Mag1cByt3s commented Feb 18, 2026

This PR adds Nix support for EOS, making it easy to build, run, and modify the project on Nix/NixOS without manually managing Python dependecies.

  • Adds Nix packaging files:
    • flake.nix exposing:
      • packages.eos / packages.default (nix build .#eos)
      • apps.default (nix run .#eos -- …)
      • devShells.default (nix develop)
    • package.nix providing a reproducible Python application build (setuptools) with runtime deps.
    • shell.nix providing a simple dev shell for non-flake workflows (nix-shell).
    • flake.lock pinning nixpkgs/flake-utils for reproducibility.
  • Fixes Python 3.12+ compatibility:
    • Replaces distutils.version.LooseVersion usage in eos/utils/version.py (removed from stdlib in Python 3.12+) with a small internal version comparator sufficient for EOS’ Symfony version comparisons.

Why:

  • EOS is a CLI tool with a small dependency set, and Nix makes installs reproducible and isolated.
  • Current upstream code relied on distutils, which breaks imports on modern Python (3.12+), and Nixpkgs commonly uses 3.12/3.13/3.14.

How to use / test:

  • Build:
    • nix build .#eos
  • Run:
    • nix run .#eos -- -h
  • Dev environment:
    • nix develop
    • (non-flake alternative): nix-shell

Notes:

  • package.nix builds EOS as a Python application and wraps the eos entrypoint.
  • flake.lock is included so users get consistent results across systems.

Files changed:

  • Added: flake.nix, flake.lock, package.nix, shell.nix
  • Updated: eos/utils/version.py, .gitignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant